import request from '@/utils/request'

/**
 * 演练计划列表
 * @param {*} query 
 * @returns 
 */
export function DrillList(query) {
    return request({
        url: '/drill/plan/list',
        method: 'get',
        params: query
    })
}

/**
 * 演练计划新增
 * @param {planTitle,planType,planDate,planMode,planLocation,planPurpose} data 
 * @returns 
 */
export function DrillAdd(data) {
    return request({
        url: '/drill/plan',
        method: 'post',
        data: data
    })
}

/**
 * 演练计划删除
 * @param {planId} planId 
 * @returns 
 */
export function DrillDelete(planId) {
    return request({
        url: '/drill/plan/' + planId,
        method: 'delete',
    })
}

/**
 * 演练计划修改
 * @param {planId} data 
 * @returns 
 */
export function DrillAmend(data) {
    return request({
        url: '/drill/plan',
        method: 'put',
        data: data
    })
}

/**
 * 演练计划详情
 * @param {planId} planId 
 * @returns 
 */
export function DrillDetails(planId) {
    return request({
        url: '/drill/plan/' + planId,
        method: 'get',
    })
}